package test

import com.gitee.ixtf.guice.Jguice
import com.gitee.ixtf.rsocket.agent.BrokerServiceAgent
import com.gitee.ixtf.vertx.guice.VertxGuice
import io.rsocket.transport.ClientTransport
import io.rsocket.transport.netty.client.TcpClientTransport
import io.vertx.core.Vertx

suspend fun main() {
  Jguice.init(VertxGuice(Vertx.vertx()))
  val serviceAgent = ServiceAgent()
  println(serviceAgent.rSocketClient())
}

class ServiceAgent : BrokerServiceAgent() {
  override val service = "service"

  override fun buildClientTransport(): ClientTransport =
      TcpClientTransport.create("git.medipath.com.cn", 39998)
}
